Integer division using reciprocals

نویسنده

  • Robert Alverson
چکیده

As logic density increases, more and more functionality is moving into hardware. Several years ago, it was uncommon to nd more than minimal support in a processor for integer multiplication and division. Now, several processors have multipliers included within the central processing unit on one integrated circuit [8, 12]. Integer division, due to its iterative nature, bene ts much less when implemented directly in hardware and is di cult to pipeline. By using a reciprocal approximation, integer division can be synthesized from a multiply followed by a shift. Without carefully selecting the reciprocal, however, the quotient obtained often su ers from o by-one errors, requiring a correction step. This paper describes the design decisions we made when architecting integer division for a new 64 bit machine. The result is a fast and economical scheme for computing both unsigned and signed integer quotients that guarantees an exact answer without any correction. The reciprocal computation is fast enough, with one table lookup and ve multiplies, that this scheme is competitive with a dedicated divider while requiring much less hardware speci c to division.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Curious Continued Fractions, Nonlinear Recurrences, and Transcendental Numbers

We consider a family of integer sequences generated by nonlinear recurrences of the second order, which have the curious property that the terms of the sequence, and integer multiples of the ratios of successive terms (which are also integers), appear interlaced in the continued fraction expansion of the sum of the reciprocals of the terms. Using the rapid (double exponential) growth of the ter...

متن کامل

Isolating Critical Cases for Reciprocals Using Integer Factorization

One approach to testing and/or proving correctness of a floating-point algorithm computing a function is based on finding input floating-point numbers such that the exact result is very close to a “rounding boundary”, i.e. a floating-point number or a midpoint between them. In the present paper we show how to do this for the reciprocal function by utilizing prime factorizations. We present the ...

متن کامل

On the Middle Prime Factor of an Integer

Given an integer n ≥ 2, let p m (n) denote the middle prime factor of n. We obtain an estimate for the sum of the reciprocals of p m (n) for n ≤ x.

متن کامل

ON FINITE SUMS OF RECIPROCALS OF DISTINCT nTR POWERS

Introduction* It has long been known that every positive rational number can be represented as a finite sum of reciprocals of distinct positive integers (the first proof having been given by Leonardo Pisano [6] in 1202). It is the purpose of this paper to characterize {cf. Theorem 4) those rational numbers which can be written as finite sums of reciprocals of distinct nth. powers of integers, w...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1991